const TOKEN = 'top-line-token'
// 保存token
const saveToken = tokenObj => {
  window.localStorage.setItem(TOKEN, JSON.stringify(tokenObj))
}
// 删除token
const removeToken = () => {
  window.localStorage.removeItem(TOKEN)
}
// 获取token
const getToken = () => {
  return JSON.parse(window.localStorage.getItem(TOKEN))
}
export { saveToken, removeToken, getToken }
